﻿<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="Organization.aspx.vb" Inherits="MemberPages_Organization" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
    
    <br />

    <div>   
        <h1 class="alignText"> <asp:Label ID="lblOrganizationName" runat="server" Text="OrganizationName"></asp:Label> </h1>
        <h1 class="alignText"> Founded by, <asp:Label ID="lblFounder" runat="server" Text="FounderName" /></h1>
        <h1 class="alignText"> Date Established, <asp:Label ID="lblDateEstablished" runat="server" Text="DateEstablished" /></h1>

        <p> &nbsp; Welcome to the organization page, here you&#39;ll find numerous controls to help 
            you, help others. Currently a list of functions are to help other people, 
            receive a compiled list of updated world-hunger related data, retrieve 
            information about other organizations, people in need and people you have 
            already helped in the past.</p>
        <p> Note: You need to register an organization to view this page properly.</p>

        <br />

        <p> Total of people you have helped: <asp:Label ID="lblPeopleHelped" runat="server"/></p>
        <p> Total of people in need: <asp:Label ID="lblPeopleInNeed" runat="server" /></p>
        <p>    </p>
        <br />

        <h1> Welcome <asp:Label ID="lbluserName" runat="server" />.</h1>

        </div>

        <asp:Label class="alignText" ID="lblOutput" runat="server"/>

        <br />

        <div><p class="alignText"> A listing of people in need:
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                DataSourceID="peopleDataSource" AllowPaging="True" AllowSorting="True" 
                HorizontalAlign="Center">
                <Columns>
                    <asp:BoundField DataField="person_Name" HeaderText="Name" 
                        SortExpression="person_Name" />
                    <asp:BoundField DataField="Location" HeaderText="Location" 
                        SortExpression="Location" />
                    <asp:BoundField DataField="help_Type" HeaderText="Type of Help Required" 
                        SortExpression="help_Type" />
                    <asp:BoundField DataField="contact_ToLocate" HeaderText="Person to Contact" 
                        SortExpression="contact_ToLocate" />
                </Columns>
            </asp:GridView>
            <div align="center"> <br /> <br />
            <asp:Table runat="server" BorderStyle="Double" CssClass="orgRegistration">
                <asp:TableRow>
                    <asp:TableCell HorizontalAlign="Center">
                        <asp:TextBox ID="txtaddName" runat="server" Text="Name of person." />
                        <asp:TextBox ID="txtaddLocation" runat="server" Text="Location." />
                        <asp:TextBox ID="txtaddTypeHelp" runat="server" Text="Type of help." />
                        <asp:TextBox ID="txtaddWhoToContact" runat="server" Text="Who to contant to locate." /> &nbsp
                         <asp:Button ID="cmdAddP" runat="server" Text="Add Person" />
                    </asp:TableCell></asp:TableRow><asp:TableRow>
                <asp:TableCell HorizontalAlign="Center">
                        <asp:TextBox ID="txthelpName" runat="server" Text="Name of person from the list." />
                        <asp:TextBox ID="txthelpType" runat="server" Text="Type of help to provide." /> &nbsp
                        <asp:Label ID="lblhelpWhoToContact" runat="server" Text="Person to contact to locate." /> &nbsp
                        <asp:Button ID="cmdHelp" runat="server" Text="Help Someone" />
                    </asp:TableCell></asp:TableRow><asp:TableRow>
                    <asp:TableCell HorizontalAlign="Center">
                    &nbsp from: &nbsp
            <asp:DropDownList ID="selectionWhereList" runat="server" >
                <asp:ListItem>Organizations Table</asp:ListItem>
                <asp:ListItem>People Helped Table</asp:ListItem>
                <asp:ListItem>People In Need Table</asp:ListItem>
            </asp:DropDownList> &nbsp
            <asp:Button ID="btnSearch" runat="server" Text="Retrieval" />
                    </asp:TableCell></asp:TableRow></asp:Table></div><br /><br />
            
            
            
            <br /><br />

            

            <br /><br />
            Information retrieved from query: <br /> <br />
            <asp:Label ID="lblRetrievedInfo" runat="server" Text="" />
        </p>
            <asp:AccessDataSource ID="peopleDataSource" runat="server" 
                DataFile="~/Database/ImagineCup.mdb" 
                SelectCommand="SELECT [person_Name], [Location], [help_Type], [contact_ToLocate] FROM [ImagineCup_PeopleInNeed]">
            </asp:AccessDataSource>

            Other things you can do: <asp:Button ID="cmdInfo" runat="server" Text="Receive Info." />
        <asp:Button ID="cmdDeleteOrg" runat="server" Text="Delete Organization" />
            </div>
            <p class="alignText" runat="server"> <a href="Org_Posting.aspx">Provide Feedback</a></p></asp:Content>